import { Icon } from './Icon';
import { LngLat } from './LngLat';
import { TMapInstance } from './Map';
import { Overlay } from './Overlay';

export interface MarkerOptions {
    icon?: Icon;
    draggable?: boolean;
    title?: string;
    zIndexOffset?: number;
    opacity?: number;
}

export interface MarkerConstructor {
    new(lnglat: LngLat, opts?: MarkerOptions): Marker;
  }

export interface Marker extends Overlay {
    getType(): number;
    getMap(): TMapInstance;
    setIcon(icon: Icon);
    getIcon(): Icon;
    setLngLat(lnglat: LngLat);
    getLngLat(): LngLat;
    setZIndexOffset(num: number): void;
    enableDragging(): void;
    disableDragging(): void;
    setOpacity(opacity: number): void;
    // openInfoWindow(infowin:InfoWindow)
    closeInfoWindow(): void;
    addEventListener(event: string, handler: (e: any) => void);
    removeEventListener(event: string, handler: () => void);
}
